Integrand size = 23, antiderivative size = 299 \[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\frac {a^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-3+n),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n)} (d \sec (e+f x))^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {b^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1+n),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n)} (d \sec (e+f x))^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}-\frac {2 a b \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-2+n),2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{n/2} (d \sec (e+f x))^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f} \]
a^2*AppellF1(1/2,-3/2+1/2*n,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2)) *cos(f*x+e)*(cos(f*x+e)^2)^(-1/2+1/2*n)*(d*sec(f*x+e))^n*sin(f*x+e)/(a^2-b ^2)^2/f+b^2*AppellF1(1/2,-1/2+1/2*n,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a ^2-b^2))*cos(f*x+e)*(cos(f*x+e)^2)^(-1/2+1/2*n)*(d*sec(f*x+e))^n*sin(f*x+e )/(a^2-b^2)^2/f-2*a*b*AppellF1(1/2,-1+1/2*n,2,3/2,sin(f*x+e)^2,a^2*sin(f*x +e)^2/(a^2-b^2))*(cos(f*x+e)^2)^(1/2*n)*(d*sec(f*x+e))^n*sin(f*x+e)/(a^2-b ^2)^2/f
Leaf count is larger than twice the leaf count of optimal. \(13816\) vs. \(2(299)=598\).
Time = 52.09 (sec) , antiderivative size = 13816, normalized size of antiderivative = 46.21 \[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\text {Result too large to show} \]
Time = 0.82 (sec) , antiderivative size = 310, normalized size of antiderivative = 1.04, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4356, 3042, 3303, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n}{\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4356 |
\(\displaystyle \cos ^n(e+f x) (d \sec (e+f x))^n \int \frac {\cos ^{2-n}(e+f x)}{(b+a \cos (e+f x))^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \cos ^n(e+f x) (d \sec (e+f x))^n \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^{2-n}}{\left (b+a \sin \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3303 |
\(\displaystyle \cos ^n(e+f x) (d \sec (e+f x))^n \int \left (\frac {b^2 \cos ^{2-n}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}-\frac {2 a b \cos ^{3-n}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}+\frac {a^2 \cos ^{4-n}(e+f x)}{\left (a^2 \cos ^2(e+f x)-b^2\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \cos ^n(e+f x) (d \sec (e+f x))^n \left (\frac {a^2 \sin (e+f x) \cos ^2(e+f x)^{\frac {n-1}{2}} \cos ^{1-n}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {n-3}{2},2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}+\frac {b^2 \sin (e+f x) \cos ^2(e+f x)^{\frac {n-1}{2}} \cos ^{1-n}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {n-1}{2},2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}-\frac {2 a b \sin (e+f x) \cos ^2(e+f x)^{n/2} \cos ^{-n}(e+f x) \operatorname {AppellF1}\left (\frac {1}{2},\frac {n-2}{2},2,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}\right )\) |
Cos[e + f*x]^n*(d*Sec[e + f*x])^n*((a^2*AppellF1[1/2, (-3 + n)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]^(1 - n)*(Co s[e + f*x]^2)^((-1 + n)/2)*Sin[e + f*x])/((a^2 - b^2)^2*f) + (b^2*AppellF1 [1/2, (-1 + n)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2) ]*Cos[e + f*x]^(1 - n)*(Cos[e + f*x]^2)^((-1 + n)/2)*Sin[e + f*x])/((a^2 - b^2)^2*f) - (2*a*b*AppellF1[1/2, (-2 + n)/2, 2, 3/2, Sin[e + f*x]^2, (a^2 *Sin[e + f*x]^2)/(a^2 - b^2)]*(Cos[e + f*x]^2)^(n/2)*Sin[e + f*x])/((a^2 - b^2)^2*f*Cos[e + f*x]^n))
3.8.81.3.1 Defintions of rubi rules used
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(d*sin[e + f*x])^n*(1/((a - b*sin[ e + f*x])^m/(a^2 - b^2*sin[e + f*x]^2)^m)), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && NeQ[a^2 - b^2, 0] && ILtQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Simp[Sin[e + f*x]^n*(d*Csc[e + f*x])^n Int[(b + a*Sin[e + f*x])^m/Sin[e + f*x]^(m + n), x], x] /; FreeQ[{a, b, d, e, f, n} , x] && NeQ[a^2 - b^2, 0] && IntegerQ[m]
\[\int \frac {\left (d \sec \left (f x +e \right )\right )^{n}}{\left (a +b \sec \left (f x +e \right )\right )^{2}}d x\]
\[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
\[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\int \frac {\left (d \sec {\left (e + f x \right )}\right )^{n}}{\left (a + b \sec {\left (e + f x \right )}\right )^{2}}\, dx \]
\[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
\[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{n}}{{\left (b \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {(d \sec (e+f x))^n}{(a+b \sec (e+f x))^2} \, dx=\int \frac {{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^n}{{\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]